import React from "react";
import {Button, Grid} from "@material-ui/core";
import {AddRounded} from "@material-ui/icons";

import {EnhancedTable, Toolbar} from "../../../shared/components";

const ViewAllWorkorder = (props) => {

    return (
        <Grid container spacing={4}>
            <Toolbar
                title="Workorder History"
                actions={<React.Fragment>
                    <Button
                        variant="contained"
                        color="primary"
                        startIcon={<AddRounded/>}
                    >
                        Create Workorder
                    </Button>
                </React.Fragment>}
            />

            <Grid item xs={12}>
                <EnhancedTable
                    title={"Workorders"}
                    schema={[
                        {id: 'id', label: 'Id', hidden: true},
                        {id: 'woNumber', label: 'WO Number', sort: true},
                        {id: 'createDate', label: 'Create Date', sort: true},
                        {id: 'vehicle', label: 'Vehicle', sort: true},
                        {id: 'dueDate', label: 'Due Date', sort: true},
                        {id: 'status', label: 'Status', sort: true},
                        {id: 'priority', label: 'Priority', sort: true},
                        {id: 'assignedTo', label: 'Assigned To', sort: true},
                        {id: 'memo', label: 'Memo', sort: true}
                    ]}
                    data={[]}
                />
            </Grid>
        </Grid>
    );
};

export default ViewAllWorkorder;
